<?php



class AccountBonusMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.AccountBonusMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('account_bonus');
		$tMap->setPhpName('AccountBonus');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('USER_ID', 'UserId', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('CODE', 'Code', 'string', CreoleTypes::VARCHAR, false, 100);

		$tMap->addColumn('BALANCE', 'Balance', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS', 'Bonus', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('DOWNLOAD_TODAY', 'DownloadToday', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('DOWNLOAD_THIS_WEEK', 'DownloadThisWeek', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('DOWNLOAD_THIS_MONTH', 'DownloadThisMonth', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('DOWNLOAD_TOTAL', 'DownloadTotal', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS_DOWNLOAD_TODAY', 'BonusDownloadToday', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS_DOWNLOAD_THIS_WEEK', 'BonusDownloadThisWeek', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS_DOWNLOAD_THIS_MONTH', 'BonusDownloadThisMonth', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS_DOWNLOAD_TOTAL', 'BonusDownloadTotal', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('SET_TODAY', 'SetToday', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('SET_THIS_WEEK', 'SetThisWeek', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('SET_THIS_MONTH', 'SetThisMonth', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('SET_TOTAL', 'SetTotal', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS_SET_TODAY', 'BonusSetToday', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS_SET_THIS_WEEK', 'BonusSetThisWeek', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS_SET_THIS_MONTH', 'BonusSetThisMonth', 'int', CreoleTypes::INTEGER, false, null);

		$tMap->addColumn('BONUS_SET_TOTAL', 'BonusSetTotal', 'int', CreoleTypes::INTEGER, false, null);

	} 
} 